package messages;


/**
 * Wall message
 * 
 * The Wall message is a specific kind of message that should be sent
 * to every client on the network.
 */
public class WallMessage extends Message {
	private static final long serialVersionUID = 1L;
	
	public WallMessage(String senderLogin, String contents) {
		super();
		
		this.contents = contents;
		this.senderLogin = senderLogin;
	}
	
	
	/**
	 * Who sent this message?
	 * 
	 * @return The name of the entity who sent the message.
	 */
	public String getSenderLogin() {
		return this.senderLogin;
	}
	
		
	public String getContents() {
		return this.contents;
	}
	
	
	public void setContents(String contents) {
		this.contents = contents;
	}
	
	
	@Override
	public String toString() {
		
		return super.toString() + " WALL (" + this.senderLogin + ") " + this.contents;
	}
	
	
	protected String senderLogin; 		// The name of the user who sent the message
	private String contents; 			// Message contents
}
